import request from '@/utils/request'

// 查询合同数据列表
export function listContract(query) {
  return request({
    url: '/crm/contract/list',
    method: 'get',
    params: query
  })
}

// 查询合同数据详细
export function getContract(contractId) {
  return request({
    url: '/crm/contract/' + contractId,
    method: 'get'
  })
}

// 新增合同数据
export function addContract(data) {
  return request({
    url: '/crm/contract',
    method: 'post',
    data: data
  })
}

// 修改合同数据
export function updateContract(data) {
  return request({
    url: '/crm/contract',
    method: 'put',
    data: data
  })
}

// 删除合同数据
export function delContract(contractId) {
  return request({
    url: '/crm/contract/' + contractId,
    method: 'delete'
  })
}

// 获取合同数据
export function getContractInfo(data) {
  return request({
    url: '/crm/contract/getContractInfo',
    method: 'post',
    data: data
  })
}

// 审核
export function audit(data) {
  return request({
    url: '/crm/contract/audit',
    method: 'post',
    data: data
  })
}